
class Edge<T>
 {
	private final Vertex vertexOne;
	private final Vertex vertexTwo;
	private double weight;
	private T edgeInfo;

	public Edge(Vertex vertexOne, Vertex vertexTwo, double w, T eInfo)
	{
		this.vertexOne = vertexOne;
		this.vertexTwo = vertexTwo;
		this.weight = w;
		this.edgeInfo = eInfo;
	}
	public Edge(Vertex vertexOne, Vertex vertexTwo, double w)
	{
		this.vertexOne = vertexOne;
		this.vertexTwo = vertexTwo;
		this.weight = w;
		this.edgeInfo = null;
	}
	public Edge(Vertex vertexOne, Vertex vertexTwo)
	{
		this.vertexOne = vertexOne;
		this.vertexTwo = vertexTwo;
		this.weight = 0;
		this.edgeInfo = null;
	}	
	public double getWeight()
	{
		return this.weight;
	}
	
	public Vertex getVertexOne()
	{
		return this.vertexOne;
	}
	
	public Vertex getVertexTwo()
	{
		return this.vertexTwo;
	}

	public T getEdgeInfo()
        {
                return this.edgeInfo;
        }
	public void setEdgeInfo(T eInfo)
	{
	    this.edgeInfo = eInfo;
	}
	public String toString()
	{
		return vertexOne+" "+vertexTwo+""; 
	}	

 }
